﻿//Create By Leven
//Copyright 2008 LevenStudio
//http://leven.com.cn/
//For LevenBlog2.0
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;

namespace LevenBlog.Core.Entities
{
    /// <summary>
    ///表lb_log
    /// </summary>
    [Serializable]
    [DataContract(Name = "log")]
    [Table("lb_log", Info = "")]
    public class lb_log : BaseEntity
    {
        [DataMember]
        [Column("id", DataType.Int32, Length = 4, CanNull = false, AutoIncrement = true, PrimaryKey = true)]
        public int id { get; set; }

        [DataMember]
        [Column("page", DataType.VarChar, Length = 510, CanNull = false)]
        public string page { get; set; }

        [DataMember]
        [Column("message", DataType.Text)]
        public string message { get; set; }

        [DataMember]
        [Column("user", DataType.VarChar, Length = 100)]
        public string user { get; set; }

        [DataMember]
        [Column("time", DataType.DateTime, CanNull = false)]
        public DateTime time { get; set; }

        [DataMember]
        [Column("ip", DataType.VarChar, Length = 100, CanNull = false)]
        public string ip { get; set; }

        public lb_log()
        {
            this.id = -1;
            this.ip = string.Empty;
            this.message = string.Empty;
            this.page = string.Empty;
            this.time = DateTime.Now;
            this.user = string.Empty;
        }

    }
}

